package topday1_9.chj;

/**
 * @Auther:小陈的Java
 */
public class OverloadMethod2 {
    int max(int a,int b){
        return (a > b) ? a : b;

    }
    double max(double a,double b){
        return (a > b) ? a : b;
    }
    double max(double a,double b,double c){
        return ((a > b) ? a : b) > c ? ((a > b) ? a : b) : c;
    }

    public static void main(String[] args) {
        OverloadMethod2 overloadMethod2 = new OverloadMethod2();
        int result1 = overloadMethod2.max(7,2);
        System.out.println(result1);
        double result2 = overloadMethod2.max(4.7, 2.6);
        System.out.println(result2);
        double result3 = overloadMethod2.max(3.22,4.12,4.55);
        System.out.println(result3);
    }
}
